//
//  ITPingManager.h
//  InduceTool
//
//  Created by 魏延龙 on 2020/8/24.
//  Copyright © 2020 魏延龙. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <PPSPing/PPSPingSummary.h>
NS_ASSUME_NONNULL_BEGIN

typedef enum : NSUInteger {
    // maximumPingTimes 为一个周期， holdNum 为预设不理想
    
    // 一直loop 达到holdNum抛出结果 继续loop
    PingUseTypeLoop,
    // 只检测一次 达到holdNum 或者达到maximumPingTimes 抛出结果
    PingUseTypeOnce,
} PingUseType;

@interface ITPingManager : NSObject

+ (instancetype)serviceWithAddress:(NSString *)address;
/// holdNum 应该大于5
+(instancetype)serviceWithAddress:(NSString *)address maximumPingTimes:(NSInteger)count holdNum:(NSInteger)holdNum pingUseType:(PingUseType)pingUseType;

- (void)startPing;
- (void)cancel;
@end

NS_ASSUME_NONNULL_END
